
var DBLClickTool = {

}

DBLClickTool.action = function (dataManger, mosEvnt, worldPos) {
    let pCurentGraph = dataManger.getCurentGraph();
    if (!pCurentGraph){
        return ;
    }
    dataManger.recordRepaintScope(pCurentGraph);
    if (pCurentGraph.chkValidUnFinish()) {
        pCurentGraph.act2Mouse(mosEvnt, worldPos);
    }
    else if (pCurentGraph.chkValidFinish()){
        let destGraph = dataManger.pickGraph(worldPos,'',true);
        if (destGraph){
            dataManger.setCurentGraph(destGraph);
        }
    }
    dataManger.recordRepaintScope(pCurentGraph);
}

export default { DBLClickTool }